package com.example.experiment2;

import java.util.ArrayList;
import java.util.List;


public class ExamTypes {
    private List<ExamType> examTypeList = new ArrayList<ExamType>();

    public ExamTypes()
    {
        initExamTypes();
    }

    public List<ExamType> getExamTypeList() {
        return examTypeList;
    }

    private void initExamTypes() {
        ExamType multiChoice  = new ExamType("选择题", R.drawable.ic_multichoice);
        ExamType trueOrFalse  = new ExamType("判断题", R.drawable.ic_trueorfalse);
        ExamType BlankFilling = new ExamType("填空题", R.drawable.ic_blankfilling);
        ExamType correction   = new ExamType("改错题", R.drawable.ic_correction);
        ExamType shortAnswer  = new ExamType("简答题", R.drawable.ic_shortanswer);
//        ExamType calculation  = new ExamType("计算题", R.drawable.ic_calculation);
//        ExamType program      = new ExamType("编程题", R.drawable.ic_program);


        examTypeList.add(multiChoice);
        examTypeList.add(trueOrFalse);
        examTypeList.add(BlankFilling);
        examTypeList.add(correction);
        examTypeList.add(shortAnswer);
//        examTypeList.add(calculation);
//        examTypeList.add(program);
    }

    public class ExamType {
        String type;
        int     imageID;      // 在ListView中显示的图片ID号

        public ExamType(String type, int imageID) {
            this.type = type;
            this.imageID = imageID;
        }

        public int getImageID() {
            return imageID;
        }

        public String getType() {
            return type;
        }
    }
}
